/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 练习;

public class test07 {
    public static void main(String[] args) {
        TriAngle ta =new TriAngle(5,8);
        test07 t= new test07();
        System.out.println("面积是"+t.findArea(ta.getBase(), ta.getHeight()));
    }
    public double findArea(double a,double b){
        return a*b/2;
    }
}
class TriAngle{
    private double base;
    private double height;

    public TriAngle(double b ,double h){
        height =h;base = b;
        System.out.println("此三角形的底和高是" + base + " " + height);
    }

    public double getBase() {
        return base;
    }
    public double getHeight() {
        return height;
    }
    public void setBase(int b) {
        base = b;
    }
    public void setHeight(int h){
        height =h;
    }
}
